import java.util.Scanner;
public class Fourth{
	public static void main(String[] args){
	Scanner sc =new Scanner(System.in);
	System.out.println("Please enter the length of the square:");
	int n=sc.nextInt();
	for(int i=1;i<=n;i++){
	System.out.print(" * ");
	}
	System.out.println();
	for (int j=1;j<n-1;j++){
		for(int i=1;i<=n;i++){
			if(i==1){
			System.out.print(" * ");
			}else if(i==n){
			System.out.println(" * ");
			}else{
			System.out.print("   ");
			}
		}
	System.out.println();
	}
	for(int i=1;i<=n;i++){
	System.out.print(" * ");
	}
	}	
}